
CC=gcc
LEX=flex
YACC=bison

all: prefix_flex prefix_bison prefix_both

prefix_flex: prefix_lex.lex
	$(LEX) $< 
	$(CC) lex.yy.c -lfl -o $@
prefix_bison: prefix_eval_bison.y
	$(YACC) $<
	$(CC) prefix_eval_bison.tab.c -o $@
prefix_both: prefix_both.y prefix_both.lex
	$(LEX) prefix_both.lex
	$(YACC) -t -d prefix_both.y
	$(CC) lex.yy.c prefix_both.tab.c -lfl -o $@

clean:
	rm -f prefix_flex prefix_bison prefix_both lex.yy.c *.tab.*
